<?php

class api
{
   
   static public function get($method, $data)
   {
      $method = explode('.', $method);
      if(sizeof($method) == 2 && file_exists(ROOT .'/RESTapi/'. $method[0] .'.inc'))
      {
         require_once (ROOT .'/RESTapi/'. $method[0] .'.inc');
         if(function_exists($method[1]))
         {
            return $method[1]($data);
         }
      }
      
      return false;
   }
}
